In the prior art, when the video data which includes each frame constituted from a pair of fields is encoded, a mode is determined after encoding by using both a frame macroblock mode and field macroblock mode and comparing numbers of generated bits therebetween. Further, as described in “VIDEO ENCODING METHOD, VIDEO ENCODING APPARATUS AND STORAGE MEDIUM STORING VIDEO ENCODING PROGRAM” of patent document 1, a method is proposed in which encoding steps are duplicated, and the mode is determined based on a result of the first step.
In encoding methods of the prior arts, there are following problems when determining a frame/field macroblock mode.
A generally used video encoding apparatus conducts encoding operation using the frame macroblock mode and the field macroblock mode and selects a comparatively efficient mode. In such a case, it is necessary to conduct encoding operations multiple times, and for example, if software is used for implementing such operations, a CPU load is increased, and it takes a long time to operate. On the other hand, if implementation of such operations is attempted by using hardware, implementation is difficult because both an area of a chip and power consumption are increased.
The present invention has an object to resolve a problem described above. To resolve such a problem, in the present invention, when encoding the video data including rectangle areas, it is possible to adaptively select the frame macroblock mode and the field macro block mode based on the input images and/or predicted motion. Therefore, the present invention can reduce the amount of calculation or the size of hardware without deteriorating the encoding efficiency.    [Patent Document 1] Japanese Patent Application, First Publication No. H11-298904